/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package noodlesscm;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author Rajasekhar
 */
public class SCM {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException
    {
        SCM s=new SCM();
    }

    public SCM() throws IOException
    {

                Add inv=new Add();
                ReqRawMaterials req=new ReqRawMaterials();
                Display d=new Display();
		int ch=0;
		String s;
		InputStreamReader ir=new InputStreamReader(System.in);
		BufferedReader br=new BufferedReader(ir);

		System.out.println("<-----Welcome to Noodle House ------>");
		System.out.println("1. ADD MENU-Product");
		System.out.println("2. ADD NEW INVENTORY ITEM");
		System.out.println("3. INVENTORY REPORT FOR MANUFACTURING A PRODUCT");
                System.out.println("4. VIEW INVENTORY ITEMS");
                System.out.println("5. VIEW MENU ");
                System.out.println("---------------------------------");
		System.out.println("6. Exit");

		while(ch!=6)
		{
			System.out.print("\n");
			System.out.println("\n Enter your Choice : ");
                        System.out.print("prompt>");
			ch=Integer.parseInt(br.readLine());

			if(ch>6||ch<1)
			{
				System.out.println("Check the input :");

			}

			if(ch==1)
			{
				s="y";
				while(s.equals("y")||s.equals("Y"))
                                    {
                                        inv.addMproduct();
					System.out.print("\n Add Menu-Product[y/n]:");
					s=br.readLine();
                                    }

			}
			else
			if(ch==2)
			{
				s="y";
				while(s.equals("y")||s.equals("Y"))
				{       inv.addInventoryItem();
					System.out.print("\n Add Item[y/n]:");
					s=br.readLine();
				}
			}
			else
			if(ch==3)
			{
                                req.invList();

			}
                       else if(ch==4)
                        {
                          d.aviInventory();
                        }
                       else if(ch==5)
                        {
                          d.manfProductlist();
                         }
		}
		System.out.println("Thanks for using this program...!");
    }

}
